package com.example.day09d_1;


import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;


/**
 * A simple {@link Fragment} subclass.
 */
public class SqlFragment extends Fragment {


    public SqlFragment() {
        // Required empty public constructor
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View inflate = inflater.inflate(R.layout.fragment_clank, container, false);
        initData();
        return inflate;
    }

    private void initData() {
        InfoDataBase mySql = new InfoDataBase(getActivity());
        mySql.initsert(new Studio("张三","男",12));
        mySql.initsert(new Studio("张三","男",12));
        mySql.initsert(new Studio("张三","男",12));
        mySql.initsert(new Studio("张三","男",12));
        mySql.updateStudent("张三",new Studio("王五","男",21));



    }


}
